package com.layui.ad.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.layui.ad.entity.SysAdmin;
import com.layui.ad.query.AdminQuery;
import com.layui.ad.utils.JsonResult;
import com.layui.ad.vo.AdminPwdVo;

import java.util.List;
import java.util.Map;

public interface SysAdminService extends IService<SysAdmin> {
    List<SysAdmin> selectRecord();

    boolean login(String username,String password);

    SysAdmin findUsername(String username);

    IPage<SysAdmin> getList2(Integer page,Integer limit,String keywords);

    //新版查询
    JsonResult getList(AdminQuery adminQuery);

    //修改状态
    JsonResult setStatus(SysAdmin entiry);

    //获取单条数据
    Map<String,Object> info(Integer id);

    //获取角色列表 并根据role_ids设置哪些选中
    List<Map<String, Object>>  getRoleList(String roleIds);

    //编辑添加功能
    JsonResult edit(SysAdmin entiry);


    //根据ID获取用户信息

    SysAdmin getUserInfo(Integer id);

    //删除用户
    JsonResult deleteById(Integer id);

    //批量删除用户
    JsonResult deleteByIds(String ids);

    //修改密码
    JsonResult updatePassword(AdminPwdVo entiry);
}
